package ${ativityPackageName}

import androidx.annotation.NonNull
import androidx.annotation.Nullable

import com.jpxx.base.ui.mvp.base.IBaseActivity
import com.jpxx.base.ui.mvp.di.component.AppComponent
import com.jpxx.base.util.ToastHelper

import ${componentPackageName}.Dagger${pageName}Component
import ${moudlePackageName}.${pageName}Module
import ${contractPackageName}.${pageName}Contract
import ${presenterPackageName}.${pageName}Presenter

import ${packageName}.R

/**
 * 如有封装BaseActivity，请继承于BaseActivity
 */
class ${pageName}Activity : BaseActivity<${pageName}Presenter>() , ${pageName}Contract.View {

    override fun setupActivityComponent(appComponent:AppComponent) {
        Dagger${pageName}Component //如找不到该类,请编译一下项目
                .builder()
                .appComponent(appComponent)
                .${extractLetters(pageName[0]?lower_case)}${pageName?substring(1,pageName?length)}Module(${pageName}Module(this))
                .build()
                .inject(this)
    }


    override fun getLayoutResourceId():Int {
        return R.layout.${activityLayoutName} //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
    }

    override fun initView() {

    }

    override fun initListener() {

    }

    override fun initData() {

    }


    override fun showLoading() {

    }

    override fun hideLoading() {

    }

    override fun showMessage(message:String) {
        ToastHelper.toastMessage(message)
    }
}
